package com.xzc.datastruc.ujava.c07._1_introduction;

public class Factorials {
    /**
     * 求N的阶乘
     */
    public static long factorial(int n) {
        if (n <= 1)
            return 1;
        else
            return n * factorial(n - 1);
    }

    public static void main(String[] args) {
        long n_1 = factorial(5);
        System.out.println(n_1);
    }
}
